<%--
    author:xuzm
    date:20180419
    
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<link type="text/css" rel="stylesheet" href="css/channelRate/channelRate.css"/>
<div class="modal-header">
    <button class="close" ng-click="back()">
        <span aria-hidden="true">×</span>
    </button>
    <h3 class="modal-title" id="modal-title">汇率添加</h3>
</div>
<div class="modal-body" id="modal-body">
		 <form id="channelRateObjForm" role="form" name="channelRateObjForm" class="form-horizontal" >
			  <div class="form-group">
			    <label for="name" class="col-sm-3 control-label" ><font color="red">*</font>类型:</label>
			    <div class="col-sm-8 set-height33" >
			    <select id="type" class="form-control select-style1" name="type" size="0" ng-model="type" ng-change="typeChange()" ng-blur="selectBlur($event)" required>
		                           <option value="" ></option>
                                   <option value="0">通用</option>
                                   <option value="1">原始币种</option>
                                   <option value="2">域名</option>
		        </select>
		        <span id="typePrompt" class="select-prompt" >必选</span>
		        </div>
			  </div>
			  <div class="form-group">
			    <label id="elementValueLabelId" for="name" class="col-sm-3 control-label" >商户号:</label>
			    <div class="col-sm-8 set-height33" >
                   <select id="elementValue" class="form-control select-style2" name="elementValue" size="0" ng-model="elementValue" ng-change="elementValueChange()"  ng-blur="selectBlur($event)" >
                                <option value="" style="display:none;"></option>
                                <option value="" ng-modal="elementValueOption" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)"></option>
                                <option ng-repeat="obj in merchants" value="{{obj.id}}" ng-modal="elementValueOption_{{obj.id}}"  ng-click="optionMouseClick($event)" >
                                    {{obj.id}}{{obj.name}}
                                </option>            
                  </select>
                  <span id="elementValuePrompt" class="select-prompt-md" ></span>
                </div>
			  </div>
			  <div class="form-group">
			    <label for="name" class="col-sm-3 control-label" ><font color="red">*</font>元素类型值:</label>
			    <div class="col-sm-8 set-height33" >
			    <input id="typeValue" type="hidden" class="form-control" name="typeValue" ng-model="typeValue" required/>
                <select id="generalTypeValue" class="form-control select-style3" name="typeValue" size="0" ng-show="isGeneralTypeValueSelect" ng-model="typeValue" ng-change="generalTypeValueChange()" ng-blur="selectBlur($event)" >
                     <option value=""></option> 
                     <option value="0">通用</option> 
                 </select>
                 <!-- <span id="generalTypeValuePrompt" class="select-prompt-ms" ><font color="#999" >需选择元素类型(必选)</font></span> -->
                 <select id="currencyTypeValue" class="form-control select-style3" name="typeValue" size="0" ng-model="typeValue" ng-show="isCurrencyTypeSelect" ng-change="currencyTypeValueChange()" ng-mousedown="selectMouseDown($event)" ng-blur="selectBlur($event)" >
                     <option value="" style="display:none;"></option>
                     <option value="" ng-modal="currencyTypeValueOption" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)"></option>
                     <option ng-repeat="obj in selectCurrencys" value="{{obj.firstValue}}" ng-modal="currencyTypeValueOption_{{obj.firstValue}}" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)" >
                         {{obj.name}}
                     </option>
                 </select>
                 <!-- <span id="currencyTypeValuePrompt" class="no-select-prompt" ><font color="#999" >需选择币种(必选)请先选择商户号,再选择域名(必选)</font></span> -->
                 <select id="siteTypeValue" class="form-control select-style3" name="typeValue" size="0" ng-show="isSiteTypeSelect" ng-model="typeValue" ng-change="siteTypeValueChange()" ng-mousedown="selectSiteMouseDown($event)" ng-blur="selectBlur($event)" >
                     <option value="" style="display:none;"></option>
                     <option value="" ng-modal="elementValueOption" ng-modal="siteTypeValueOption" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)" ></option>
                     <option ng-repeat="obj in websites" value="{{obj.id}}"  ng-modal="siteTypeValueOption_{{obj.id}}" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)" >
                         {{obj.siteUrl}}
                     </option>
                 </select>
                 <span id="typeValuePrompt" class="select-prompt-ms" >需选择元素类型(必选)</span>
                 </div>
			  </div>
			  <div class="form-group">
			    <label for="upPercent" class="col-sm-3 control-label" ><font color="red">*</font>上抛点数</label>
			    <div class="col-sm-8" >
			    <input type="text" id="upPercent" name="upPercent" tip="2"  ng-focus="upPercentFocus()" ng-blur="upPercentBlur()" class="form-control" placeholder="必填且需为小数"  required/>
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="remark" class="col-sm-3 control-label" >备注</label>
			    <div class="col-sm-8" >
			    <input type="text" id="remark" name="remark" tip="2"  ng-focus="generalFocus($event)" class="form-control" placeholder="" />
			    </div>
			  </div>	
		</form>
		<div class="row padding-set">
        <div class="col-sm-12">
            <div class="center">
                <button class="btn btn-sm btn-primary general-btn" type="button" ng-disabled="addIsDisabled || addElementValueIsDisabled || addTypeValueIsDisabled || addUpPercentIsDisabled || channelRateObjForm.type.$invalid" ng-click="addChannelRate()" >
                                                                        确定
                </button>
            </div>
        </div>
       </div>
</div>